package com.yvtian.inv.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yvtian.inv.pojo.InvPlanShopEntity;
import com.yvtian.inv.dao.InvPlanShopMapper;
import com.yvtian.inv.service.InvPlanShopService;
import com.yvtian.utils.StringHelper;
import org.springframework.stereotype.Service;

/**
 * (inv_plan_shop)表服务实现类
 *
 * @author long
 * @since 2024-06-20 15:28:13
 */
@Service("invPlanShopService")
public class InvPlanShopServiceImpl extends ServiceImpl<InvPlanShopMapper, InvPlanShopEntity> implements InvPlanShopService {

    @Override
    public IPage<InvPlanShopEntity> findByPage(Page<InvPlanShopEntity> page, InvPlanShopEntity invPlanShopEntity) {
        LambdaQueryWrapper<InvPlanShopEntity> queryWrapper = new LambdaQueryWrapper<>();
        if (StringHelper.isNotEmpty(invPlanShopEntity.getPlanCode())){
            queryWrapper.eq(InvPlanShopEntity::getPlanCode, invPlanShopEntity.getPlanCode());
        }
        return this.page(page, queryWrapper);
    }
}

